#ifndef SCROLLITEMLIST_H_
#define SCROLLITEMLIST_H_

#include "./ButtonListArrow.h"
#include "./listeners/ItemListUpButtonListener.h"
#include "./listeners/ItemListDownButtonListener.h"
#include "ItemList.h"

#define LIST_ITEMS_ON_SCREEN 2
#define UP_IMG "list_up_arrow"
#define DOWN_IMG "list_down_arrow"
#define BAR_IMG "list_bar"
#define ARROW_WIDTH 22
#define ARROW_HEIGHT 22
#define ITEM_WIDTH LIST_WIDTH-ARROW_WIDTH
#define ITEM_HEIGHT 50
#define LIST_WIDTH 300
#define LIST_HEIGHT ITEM_HEIGHT*LIST_ITEMS_ON_SCREEN
#define BAR_HEIGHT 52

class ScrollItemList: public ItemList{
public:
	ScrollItemList (std::string scenariosListXMLPath, int posX, int posY, Widget* parent);
	virtual ~ScrollItemList();

	void handleEvent(Event event);
	void resolve();
	void showOn(SDL_Surface* surface);
	std::string getSelected();
private:
	int bar_pos_height;
	int pos;
	void fillButtonList();
protected:
	ButtonListArrow* upButton;
	ButtonListArrow* downButton;
	Button* barButton;
};

#endif /* SCROLLITEMLIST_H_ */
